package com.xinqing.test.flink.datastream.selector;

import com.feidee.fdcommon.util.MD5Util;
import com.xinqing.test.flink.datastream.model.Student;
import org.apache.flink.api.java.functions.KeySelector;
import sun.security.provider.MD5;

/**
 * @Author:CHQ
 * @Date:2021/4/21 10:45
 * @Description
 */
public class MySelector implements KeySelector<Student, String> {
    @Override
    public String getKey(Student value) throws Exception {
        return MD5Util.string2MD5(value.getSid());
    }
}
